// 模拟耗时计算
self.onmessage = function(e) {
  const { count } = e.data
  let result = 0
  
  // 执行大量计算
  for (let i = 0; i < count; i++) {
    result += Math.sqrt(i) * Math.sin(i)
  }
  
  // 返回计算结果
  self.postMessage(result.toFixed(2))
} 